const Router = require("koa-router");
const { authController } = require("./auth.controller");
const router = new Router({ prefix: "/auth" });
const { ApiDescribe } = require('@/logger/api-logger.middleware');

// 登录
router.post("/login", ApiDescribe('登录系统'), authController.login);
// 微信登录
router.post("/wechat_login", authController.wechatLogin);
// 注册
router.post("/user_register", authController.userRegister);
// 验证登录状态
router.get("/check_state", authController.checkAuthState);
// 获取登录信息
router.post("/get_user_profile", authController.getUserProfile)
// 设置隐私授权
router.put("/set_privacy_agreement", authController.setPrivacyAgreement)
// 退出登录
router.get("/logout", ApiDescribe('退出系统'), authController.logout);

module.exports = router;
